import java.lang.invoke.SerializedLambda;

public class Test5 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        int left = 0;
        int searchNum = 2;
        int right = arr.length-1;
        int middle = arr.length/2;
        if (middle < searchNum){
            left++;
        }else if(middle > searchNum){
            right--;
        }else{
            searchNum = middle;
        }

        System.out.println(searchNum);
    }
}
